package com.starlink.model.util;

import com.starlink.model.dtomapper.BannerJumpDtoMapper;
import com.starlink.model.domain.BannerJumpDO;
import com.starlink.model.vo.BannerJumpVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class BannerJumpConvert {

    public static List<BannerJumpVO> buildBannerJumpVoList(List<BannerJumpDO> bannerJumpDOList) {
        if (CollectionUtils.isEmpty(bannerJumpDOList)) {
            return Lists.newArrayList();
        }
        List<BannerJumpVO> bannerJumpVOList = new ArrayList<>();
        for (BannerJumpDO bannerJumpDO : bannerJumpDOList) {
            bannerJumpVOList.add(BannerJumpDtoMapper.INSTANCE.do2VO(bannerJumpDO));
        }

        return bannerJumpVOList;
    }
}
